package com.community.owner.mapper;

import java.util.List;
import com.community.owner.domain.Owner;
import com.community.owner.domain.vo.OwnerAddRequest;
import com.community.owner.domain.vo.OwnerVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 业主信息Mapper接口
 * 
 * @author ruoyi
 * @date 2025-10-25
 */
@Mapper
public interface OwnerMapper 
{
    /**
     * 查询业主信息
     * 
     * @param ownerId 业主信息主键
     * @return 业主信息
     */
    public Owner selectOwnerByOwnerId(Long ownerId);

    /**
     * 查询业主信息列表
     * 
     * @param owner 业主信息
     * @return 业主信息集合
     */
    public List<Owner> selectOwnerList(Owner owner);


    /**
     * 新增业主信息
     * 
     * @param owner 业主信息
     * @return 结果
     */
    public int insertOwner(Owner owner);

    /**
     * 修改业主信息
     * 
     * @param owner 业主信息
     * @return 结果
     */
    public int updateOwner(Owner owner);

    /**
     * 删除业主信息
     * 
     * @param ownerId 业主信息主键
     * @return 结果
     */
    public int deleteOwnerByOwnerId(Long ownerId);

    /**
     * 批量删除业主信息
     * 
     * @param ownerIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOwnerByOwnerIds(Long[] ownerIds);

//查询单个业主详细信息（包含所有字段）
    Owner selectOwnerWithDetailsByOwnerId(Long ownerId);


    /**
     * 查询业主列表（支持分页）
     */
    List<OwnerVo> selectOwnerVoList(OwnerVo ownerVo);

    Integer addPermsByFile(@Param("ownerList") List<Owner> ownerList);


    Integer insertOwnerAddRequest(Owner owner);

    @Select("select count(*) from owner")
    long count();

}
